package service

import (
	"context"
	v1 "platform-sastay-file/api/platform/v1"
)

// GetNodes 获取所有节点信息
func (p *PlatformService) GetNodes(ctx context.Context, req *v1.GetNodesRequest) (*v1.GetNodesResponse, error) {
	nodes, err := p.nu.GetNodes(ctx, req.Name)
	if err != nil {
		return nil, err
	}
	return &v1.GetNodesResponse{Ip: nodes}, nil
}
